package com.igeek.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author spike
 * @since 2022-01-12
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel("商品分类信息")
public class Category implements Serializable {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty("分类ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    @ApiModelProperty("分类名称")
    private String name;
    @ApiModelProperty("分类对应的产品")
    @TableField(exist = false)
    List<Product> products;
    @ApiModelProperty("分类对应的每一行产品")
    @TableField(exist = false)
    List<List<Product>> productsByRow;

    public Category(Integer id) {
        this.id = id;
    }
}
